function [] = PathPaint(x1,y1,x_1,z_1,xc_1,zc_1,R)
% This function
% Name          :PathPaint
% Descriptions  :三维空间管道绘制：管道面，参考轨迹和实际轨迹
% Argument(s)   :R:管道半径；
% Return(s)     :
% Author        :LHP, on 4/17/2022
%% 三维曲面绘制:圆柱面
h=0:0.1:10;%所画图形的z坐标范围
t=0:pi/40:2*pi;
x=zeros(length(h),length(t));
y=zeros(length(h),length(t));
z=zeros(length(h),length(t));
for i =1:length(h)
x(i,:)=R*cos(t);
end
for j =1:length(h)
y(j,:)=R*sin(t)+R;
end
for k =1:length(h)
z(k,:)=h(k);
end
mesh(x,y,z) 
%axis([-5 5 0 5 0 10])
hold on

%% 三维曲线绘制:参考轨迹
z=y1;
x=R*sin(x1/R);
y=R*(1-cos(x1/R));
plot3(x,y,z,'r-','linewidth',1); % '--r'
hold on;

%% 三维曲线绘制:标称轨迹

% z2=z_1;
% x2=R*sin(x_1/R);
% y2=R*(1-cos(x_1/R));
% plot3(x2,y2,z2,'b.','linewidth',2); % ':b'
% hold on;

%% 三维曲线绘制：实际轨迹
%二维直线转换到三维圆柱面

% zc2=zc_1;
% xc2=R*sin(xc_1/R);
% yc2=R*(1-cos(xc_1/R));
% plot3(xc2,yc2,zc2,'g--','linewidth',3); % ':b'
xlabel('x轴');
ylabel('y轴');
zlabel('z轴');
% title('管道面轨迹跟踪','FontSize',13)
% legend({'','ref','nomi-sim','tube-sim'});

legend({'','ref'})